import entity.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import service.UserService;

import java.util.Map;

public class Text {
    public static void main(String[] args) {
        User user=new User();
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserService userService = applicationContext.getBean("userService", UserService.class);
//        for (Map<String, String> stringStringMap : userService.findAll()) {
//            System.out.println(stringStringMap);
//        }
        //System.out.println(userService.findAll());
       // System.out.println(userService.deleteUser(3));
//        user.setAccount("奥黛丽");
//        user.setPassword("123456");
//        user.setEmail("@ADL.com");
//        System.out.println(userService.insertUser(user));
        System.out.println(userService.updateUser(5,"泰勒"));

    }
}
